package com.voltmao.webpro.frame.dto.status;

public enum Constants {
    SUCCESS(200, "成功"),
    DATA_NULL(0, "请求数据为空"),
    FAIVAL(500, "系统错误:请求数据失败!"),
    NO_URL_FAIVAL(402, "内部错误:requestUrl未定义"),
    NO_FUN_FAIVAL(403, "内部错误:查询接口未定义"),
    AUTH_FAIVAL(401, "用户名或密码错误"),
    SEND_VERIF_CODE_FAIAL(501, "发送验证码失败"),
    PHONE_FAIVAL(405, "手机号格式不正确"),
    PHONE_EXIST(406, "手机号已存在"),

    REG_FAIVAL(502, "注册失败"),
    UPDATE_FAIVAL(505, "更新失败"),
    SESSION_TIMEOUT(507,"会话过期"),
    PARAMETER_ERROR(506,"请求参数不全"),
    EXTERNA_ERROR(508,"关联外部参数异常"),
    FORBID_ERROR(509, "禁止更改项"),
    SEARCH_ERROR(510, "查询关联表项为空"),
    FORBID_DELETE(511, "禁止删除");



    private int nCode;
    private String des;

    Constants(int code, String des) {
        this.nCode = code;
        this.des = des;
    }

    @Override
    public String toString() {
        return String.valueOf(this.nCode);

    }

    /**
     * @return
     */
    public String getDes() {
        return this.des;
    }
}

